unsigned int opt_dom0_mem = 16000; /* default kbytes for DOM0 */
unsigned int opt_ne_base = 0; /* NE2k NICs cannot be probed */
unsigned char opt_ifname[10] = "eth0";
-enum { OPT_IP, OPT_STR, OPT_UINT };
+int opt_noht=0, opt_noacpi=0;
+enum { OPT_IP, OPT_STR, OPT_UINT, OPT_BOOL };
static struct {
unsigned char *name;
int type;
{ "dom0_mem", OPT_UINT, &opt_dom0_mem },
{ "ne_base", OPT_UINT, &opt_ne_base },
{ "ifname", OPT_STR, &opt_ifname },
+ { "noht", OPT_BOOL, &opt_noht },
+ { "noacpi", OPT_BOOL, &opt_noacpi },
{ NULL, 0, NULL }
};
while ( cmdline != NULL )
{
while ( *cmdline == ' ' ) cmdline++;
- if ( (opt = strchr(cmdline, '=')) == NULL ) break;
- *opt++ = '\0';
- opt_end = strchr(opt, ' ');
+ if ( *cmdline == '\0' ) break;
+ opt_end = strchr(cmdline, ' ');
if ( opt_end != NULL ) *opt_end++ = '\0';
+ opt = strchr(cmdline, '=');
+ if ( opt != NULL ) *opt++ = '\0';
for ( i = 0; opts[i].name != NULL; i++ )
{
- if ( strcmp(opts[i].name, cmdline ) == 0 )
+ if ( strcmp(opts[i].name, cmdline ) != 0 ) continue;
+ switch ( opts[i].type )
{
- if ( opts[i].type == OPT_IP )
- {
+ case OPT_IP:
+ if ( opt != NULL )
*(unsigned long *)opts[i].var = str_to_quad(opt);
- }
- else if(opts[i].type == OPT_STR)
- {
+ break;
+ case OPT_STR:
+ if ( opt != NULL )
strcpy(opts[i].var, opt);
- }
- else /* opts[i].type == OPT_UINT */
- {
+ break;
+ case OPT_UINT:
+ if ( opt != NULL )
*(unsigned int *)opts[i].var =
simple_strtol(opt, (char **)&opt, 0);
- }
+ break;
+ case OPT_BOOL:
+ *(int *)opts[i].var = 1;
break;
}
}
#define X86_FEATURE_XMM (0*32+25) /* Streaming SIMD Extensions */
#define X86_FEATURE_XMM2 (0*32+26) /* Streaming SIMD Extensions-2 */
#define X86_FEATURE_SELFSNOOP (0*32+27) /* CPU self snoop */
+#define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */
#define X86_FEATURE_ACC (0*32+29) /* Automatic clock control */
#define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */
#define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */
#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */
+#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
+
#endif /* __ASM_I386_CPUFEATURE_H */
/*